package wt.jly.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import wt.jly.dao.UserMapper;
import wt.jly.domain.User;
import wt.jly.service.UserService;

import java.util.List;

/**
 * @author lanyangji
 * @date 2018/9/19 22:45
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findByUserName(String userName) {
        return userMapper.findByUserName(userName);
    }

    @Override
    public List<String> findPermissionsByUserId(Integer id) {
        return userMapper.findPermissionsByUserId(id);
    }
}
